package com.digitalchina.lxnsy.viewholder;

import android.view.ViewGroup;
import android.widget.TextView;

import com.digitalchina.lxnsy.R;
import com.digitalchina.lxnsy.entity.GoodsVO;
import com.digitalchina.lxnsy.toolkit.FrescoUtil;
import com.facebook.drawee.view.SimpleDraweeView;
import com.jude.easyrecyclerview.adapter.BaseViewHolder;

/**
 * ================================================
 * 项目名称：BigData
 * 类描述：
 * 包名：com.digitalchina.bigdata.viewholder
 * 创建人：郑皓
 * 创建时间：2017/1/11 18:44
 * 修改备注：
 * ================================================
 */
public class GoodsQualityHolder extends BaseViewHolder<GoodsVO> {

    private SimpleDraweeView itemGoodsQualitySdv;
    private TextView itemGoodsQualityTvTitle;

    public GoodsQualityHolder(ViewGroup parent) {
        super(parent, R.layout.item_merchant_goods_quality);
        itemGoodsQualitySdv = $(R.id.item_goods_quality_sdv);
        itemGoodsQualityTvTitle = $(R.id.item_goods_quality_tv_title);
    }

    @Override
    public void setData(GoodsVO data) {
        super.setData(data);

        FrescoUtil.showImageSmall(data.getImages() != null ? data.getImages() : "", itemGoodsQualitySdv);
        itemGoodsQualityTvTitle.setText(data.getTitle() != null ? data.getTitle() : "");

    }
}
